package trajectories;

@Deprecated
public class CircleTrajectorie extends Trajectory {

    private final Directions TRAJECTORY_DIRECTION = Directions.RIGHT;
    double angle = 0;

//    int x0 = x + 40;
//    int y0 = y + 40;

    @Override
    public void move() {
        // double r = Math.sqrt((Math.pow(x - x0, 2)) + (Math.pow(y - y0, 2)));
        double r = 5;
        x += r * Math.cos(angle);
        y += r * Math.sin(angle);

//        if (TRAJECTORY_DIRECTION == Directions.RIGHT) {
//            if (x == 400) {
//                TRAJECTORY_DIRECTION = Directions.LEFT;
//                x0 -= 10;
//                x = x0 + 20;
//            }
//        } else if (TRAJECTORY_DIRECTION == Directions.LEFT) {
//            if (x == 100) {
//                TRAJECTORY_DIRECTION = Directions.RIGHT;
//                x0 += 10;
//                x = x0 + 20;
//            }
//        }
        angle += 0.05;

    }

}
